import { request } from '@/utils/request'
import type { User, CodeType, UserInfo } from '@/types/user'
export const loginApi = (mobile: string, password: string) => {
  return request<User>('/login/password', 'POST', { mobile, password })
}

// 发送验证码
export const sendMobileCode = (mobile: string, type: CodeType) =>
  request('/code', 'GET', { mobile, type })
export const getUserInfo = () => request<UserInfo>('/patient/myUser')
